// @ts-nocheck
import { request } from '@/request'


//获取网站信息
export function getWebConfig() {
    return request({
        url: '/api/setting.Setting/setting',
        method: 'get',
    })
}
//获取分类列表
export function getNewsCateList(data) {
    return request({
        url: '/api/content.Category/category',
        params: data,
        method: 'get',

    })
}
//获取导航列表
export function getNavList(data) {
    return request({
        url: '/api/setting.Frontmenu/list',
        params: data,
        method: 'get',

    })
}
//获取分类信息
export function getNewsCateInfo(data) {
    return request({
        url: '/api/content.Category/info',
        params: data,
        method: 'get',
    })
}
//获取文章列表
export function getNewsList(data) {
    return request({
        url: '/api/content.Content/list',
        params: data,
        method: 'get',
    })

}
//根据分类获取文章列表
export function getNewsListByCate(data) {
    return request({
        url: '/api/content.Category/list',
        params: data,
        method: 'get',
    })

}
//获取文章内容
export function getNewsContent(data) {
    return request({
        url: '/api/content.Content/info',
        method: 'get',
        params: data,
    })

}
//获取音乐列表
export function getFileList(data) {
    return request({
        url: '/api/file.File/list',
        method: 'get',
        params: data,
    })

}
//获取音乐播放地址
export function getMusicPlayUrl(data) {
    return request({
        url: '/music/song',
        method: 'get',
        params: data,
        headers: {
            'X-Access-Token': sessionStorage.getItem('userKey')
        },

    })

}
//获取首页轮播
export function getIndexSlider(data) {
    return request({
        url: '/api/setting.Carousel/info',
        method: 'get',
        params: data,
    })
}
//获取内容统计
export function contentStatistic() {
    return request({
        url: '/api/setting.Setting/statistic',
        method: 'get',
    })
}
//获取内容统计
export function tagList(data) {
    return request({
        url: '/api/content.Tag/list',
        method: 'get',
        params: data,
    })
}
//获取热门文章
export function hotNews(limit) {
    let data={
        page: 1,
        limit: limit,
        sort_field: 'hits',
        sort_value: 'desc'
    }
    return request({
        url: '/api/content.Content/list',
        method: 'get',
        params: data,
    })
}